package com.hst.capacity.domain.model.response.account;

import com.hst.capacity.domain.model.entity.account.*;
import com.hst.capacity.domain.model.entity.driver.DriverEntity;
import com.hst.capacity.domain.model.entity.driver.DriverProfileEntity;
import com.hst.capacity.domain.model.entity.franchisee.FranchiseeEntity;
import com.hst.capacity.domain.model.entity.order.express.ExOrderSettlementViewEntity;
import com.hst.capacity.domain.model.entity.order.express.ExpressOrderEntity;
import com.hst.capacity.domain.model.entity.order.express.ExpressOrderSettlementEntity;
import com.hst.capacity.domain.model.entity.order.intercity.IcOrderSettlementViewEntity;
import com.hst.capacity.domain.model.entity.order.intercity.IntercityOrderEntity;
import com.hst.capacity.domain.model.entity.order.intercity.IntercityOrderSettlementEntity;
import com.hst.capacity.domain.model.entity.order.specialcar.SpCarOrderSettlementEntity;
import com.hst.capacity.domain.model.entity.order.specialcar.SpCarOrderSettlementViewEntity;
import com.hst.capacity.domain.model.entity.setting.station.SysRegionEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

import java.time.LocalDateTime;

@Data
@Alias("driverAccountVO")
public class DriverAccountVO {

    private String idDriver;//司机主键
    private String driverCode;
    private String driverMobile;
    private String driverName;
    private Float balance;
    private Float withdrawDeposit;
    private Float income;
    private Float applyMoney;
    private String state;
    private String jobType;
    private String cityName;
    private String idFranchisee;
    private String franchiseeName;

    public DriverAccountVO(ExDriverAccountEntity account, DriverEntity driver, DriverProfileEntity dp, SysRegionEntity r, FranchiseeEntity f) {
        this.idDriver = driver.getIdDriver();
        this.driverCode = driver.getDriverCode();
        this.driverMobile = driver.getDriverMobile();
        this.driverName = dp.getRealName();
        this.balance = account.getBalance();
        this.withdrawDeposit = account.getWithdrawDeposit();
        this.income = account.getIncome();
        this.applyMoney = account.getApplyMoney();
        this.state = account.getState().toString();
        this.cityName = r.getName();
        this.franchiseeName = f.getShortName();
        if (dp.getJobType()==null || dp.getJobType()==0){
            this.jobType = "兼职";
        }else{
            this.jobType = "全职";
        }
    }
    public DriverAccountVO(IcDriverAccountEntity account, DriverEntity driver, DriverProfileEntity dp, SysRegionEntity r, FranchiseeEntity f) {
        this.idDriver = driver.getIdDriver();
        this.driverCode = driver.getDriverCode();
        this.driverMobile = driver.getDriverMobile();
        this.driverName = dp.getRealName();
        this.balance = account.getBalance();
        this.withdrawDeposit = account.getWithdrawDeposit();
        this.income = account.getIncome();
        this.applyMoney = account.getApplyMoney();
        this.state = account.getState().toString();
        this.cityName = r.getName();
        this.franchiseeName = f.getShortName();
        if (dp.getJobType()==null || dp.getJobType()==0){
            this.jobType = "兼职";
        }else{
            this.jobType = "全职";
        }
    }
    public DriverAccountVO(SpDriverAccountEntity account, DriverEntity driver, DriverProfileEntity dp, SysRegionEntity r, FranchiseeEntity f) {
        this.idDriver = driver.getIdDriver();
        this.driverCode = driver.getDriverCode();
        this.driverMobile = driver.getDriverMobile();
        this.driverName = dp.getRealName();
        this.balance = account.getBalance();
        this.withdrawDeposit = account.getWithdrawDeposit();
        this.income = account.getIncome();
        this.applyMoney = account.getApplyMoney();
        this.state = account.getState().toString();
        this.cityName = r.getName();
        this.franchiseeName = f.getShortName();
        if (dp.getJobType()==null || dp.getJobType()==0){
            this.jobType = "兼职";
        }else{
            this.jobType = "全职";
        }
    }
    public DriverAccountVO(ExDriverAccountEntity account, DriverEntity driver, DriverProfileEntity dp, FranchiseeEntity f) {
        this.idDriver = driver.getIdDriver();
        this.driverCode = driver.getDriverCode();
        this.driverMobile = driver.getDriverMobile();
        this.driverName = dp.getRealName();
        this.balance = account.getBalance();
        this.withdrawDeposit = account.getWithdrawDeposit();
        this.income = account.getIncome();
        this.applyMoney = account.getApplyMoney();
        this.state = account.getState().toString();
        this.franchiseeName = f.getShortName();
        if (dp.getJobType()==null || dp.getJobType()==0){
            this.jobType = "兼职";
        }else{
            this.jobType = "全职";
        }
    }

    public DriverAccountVO(IcDriverAccountEntity account, DriverEntity driver, DriverProfileEntity dp, FranchiseeEntity f) {
        this.idDriver = driver.getIdDriver();
        this.driverCode = driver.getDriverCode();
        this.driverMobile = driver.getDriverMobile();
        this.driverName = dp.getRealName();
        this.balance = account.getBalance();
        this.withdrawDeposit = account.getWithdrawDeposit();
        this.income = account.getIncome();
        this.applyMoney = account.getApplyMoney();
        this.state = account.getState().toString();
        this.franchiseeName = f.getShortName();
        if (dp.getJobType()==null || dp.getJobType()==0){
            this.jobType = "兼职";
        }else{
            this.jobType = "全职";
        }
    }

    public DriverAccountVO(SpDriverAccountEntity account, DriverEntity driver, DriverProfileEntity dp, FranchiseeEntity f) {
        this.idDriver = driver.getIdDriver();
        this.driverCode = driver.getDriverCode();
        this.driverMobile = driver.getDriverMobile();
        this.driverName = dp.getRealName();
        this.balance = account.getBalance();
        this.withdrawDeposit = account.getWithdrawDeposit();
        this.income = account.getIncome();
        this.applyMoney = account.getApplyMoney();
        this.state = account.getState().toString();
        this.franchiseeName = f.getShortName();
        if (dp.getJobType()==null || dp.getJobType()==0){
            this.jobType = "兼职";
        }else{
            this.jobType = "全职";
        }
    }
    
    public DriverAccountVO(IcDriverAccountEntity account, DriverEntity driver, DriverProfileEntity dp) {
        this.idDriver = driver.getIdDriver();
        this.driverCode = driver.getDriverCode();
        this.driverMobile = driver.getDriverMobile();
        this.balance = account.getBalance();
        this.withdrawDeposit = account.getWithdrawDeposit();
        this.income = account.getIncome();
        this.applyMoney = account.getApplyMoney();
        this.state = account.getState().toString();
        this.driverName = dp.getRealName();
        this.idFranchisee = driver.getIdFranchisee();
    }

    public DriverAccountVO(ExDriverAccountEntity account, DriverEntity driver, DriverProfileEntity dp) {
        this.idDriver = driver.getIdDriver();
        this.driverCode = driver.getDriverCode();
        this.driverMobile = driver.getDriverMobile();
        this.balance = account.getBalance();
        this.withdrawDeposit = account.getWithdrawDeposit();
        this.income = account.getIncome();
        this.applyMoney = account.getApplyMoney();
        this.state = account.getState().toString();
        this.driverName = dp.getRealName();
        this.idFranchisee = driver.getIdFranchisee();
    }

    public DriverAccountVO(SpDriverAccountEntity account, DriverEntity driver, DriverProfileEntity dp) {
        this.idDriver = driver.getIdDriver();
        this.driverCode = driver.getDriverCode();
        this.driverMobile = driver.getDriverMobile();
        this.balance = account.getBalance();
        this.withdrawDeposit = account.getWithdrawDeposit();
        this.income = account.getIncome();
        this.applyMoney = account.getApplyMoney();
        this.state = account.getState().toString();
        this.driverName = dp.getRealName();
        this.idFranchisee = driver.getIdFranchisee();
    }

}
